<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../publics/jstl.jsp"%>
<html>
<head>
    <title>修改密码</title>
    <link href="${ctx}/resource/publics/jquery-easyui-1.4.4/themes/default/easyui.css" rel="stylesheet" type="text/css">
    <link href="${ctx}/resource/publics/jquery-easyui-1.4.4/themes/icon.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="${ctx}/resource/publics/jquery-easyui-1.4.4/jquery.min.js"></script>
    <script type="text/javascript" src="${ctx}/resource/publics/jquery-easyui-1.4.4/jquery.easyui.min.js"></script>
</head>
<body style="text-align: left">
<form id="ff" style="padding: 20px;">
    <div style="margin-bottom: 10px;">
        <span>　旧密码：</span>
        <input id="password" name="password" class="easyui-textbox" data-options="required:true" type="password" style="height:30px;padding:10px;">
    </div>
    <div style="margin-bottom: 10px;">
        <span>　新密码：</span>
        <input id="password1" name="password1" class="easyui-textbox" data-options="required:true" type="password" style="height:30px;padding:10px;">
    </div>
    <div style="margin-bottom: 10px;">
        <span>确认密码：</span>
        <input id="password2" name="password2" class="easyui-textbox" data-options="required:true" type="password" style="height:30px;padding:10px;">
    </div>
    <div style="margin-left: 40px;">
        <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)"  onclick="submitForm()" style="width:80px">提交</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-clear'" href="javascript:void(0)" onclick="clearForm()" style="width:80px">清空</a>
    </div>
</form>
<script type="text/javascript">
    function submitForm() {
        var password = $('#password').val();
        var password1 = $('#password1').val();
        var password2 = $('#password2').val();
        var paramz = {"password":password,"password1":password1,"password2":password2};
        $.post('${ctx}/manage/main/savePass', paramz, function(data){
            if (data.ret == 0) {
                clearForm();
            }
            $.messager.alert('提示', data.msg);
        },'json');
    }
    function clearForm() {
        $('#ff').form('clear');
    }
</script>
</body>
</html>
